//---------------------------------------------------------------------------
#ifndef DMRcbtoH
#define DMRcbtoH

//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "PHTable.h"
#include "StDMRbto.h"

//---------------------------------------------------------------------------
class TDMRcbto1 : public TDataModule
{
  __published:
    PHTable*  TBRcbto;
    void __fastcall TBRcbtoAfterOpen( TObject* Sender );
    void __fastcall TBRcbtoValor8Validate( int Elemento, Variant& Conteudo, PHDataSource* DS );
    void __fastcall TBRcbtoRetencoes9Validate( int Elemento, Variant& Conteudo, PHDataSource* DS );
    void __fastcall TBRcbtoDesconto10Validate( int Elemento, Variant& Conteudo, PHDataSource* DS );
    void __fastcall TBRcbtoMulta11Validate( int Elemento, Variant& Conteudo, PHDataSource* DS );
    void __fastcall TBRcbtoJuros12Validate( int Elemento, Variant& Conteudo, PHDataSource* DS );
    void __fastcall TBRcbtoTipo2Validate( int Elemento, Variant& Conteudo, PHDataSource* DS );
    void __fastcall TBRcbtoMesAnoOrigem3Validate( int Elemento, Variant&  Conteudo, PHDataSource*  DS );
    void __fastcall TBRcbtoCodigoCliente4Validate( int Elemento, Variant&  Conteudo, PHDataSource*  DS );
    void __fastcall TBRcbtoLiquido15Validate(int Elemento, Variant &Conteudo, PHDataSource *DS);
    void __fastcall TBRcbtoCredito21Validate(int Elemento, Variant &Conteudo, PHDataSource *DS);
    void __fastcall TBRcbtoCreditoUtilizado22Validate(int Elemento, Variant &Conteudo, PHDataSource *DS);
    void __fastcall TBRcbtoTipoRec23Validate(int Elemento, Variant &Conteudo, PHDataSource *DS);
 void __fastcall TBRcbtoLancamentoFat25Validate(int Elemento,
          Variant &Conteudo, PHDataSource *DS);

  private:
    void __fastcall BAtFat( int MesAno, AnsiString Cliente, AnsiString LancFat, PHDataSource* DS );
    bool EmpresaOK;

  public:
    __fastcall TDMRcbto1( TComponent* Owner );
    bool __fastcall TemFat( int CodEmp, int MesAno, AnsiString Lancamento );
    bool __fastcall TemCampo( int CodEmp, AnsiString Campo, AnsiString Conteudo );
    double __fastcall AtualizaCreditoAnterior(int Cliente);
    double SaldoCredito;
};

//---------------------------------------------------------------------------
extern PACKAGE TDMRcbto1*  DMRcbto1;

//---------------------------------------------------------------------------
#endif

